﻿@using WebTech.Coursework02.Utilities;
    
@{
    ViewBag.Title = "Home Page";
}


<h3>Search for an Employee</h3>

<script type="text/x-kendo-template" id="template">
<div id="tabstrip">
    <ul>
      <li>Salary Details</li>
      <li>Salary History</li>
    </ul>
    <div><div id="salaryDetails"></div></div>
    <div><div id="titleHistory"></div></div>
  </div>
</script>

<script type="text/x-kendo-template" id="toolBarTemplate">
    <div style="height:30px; text-align: right">
        <label class="category-label" for="category">Sel</label>
        <input type="search" id="requestType" style="width: 120px"></input>
    </div>
</script>
@{
    // check if the user is the HR Manager, if then render the Kendo UI Table
    // commented out user role for the time being   
    if (!User.IsInRole(UserRoles.HRManager.ToString()))
    {
       
        <div>
             <input id="txtbxSearchMulti" type="text" />
             <select id="cmbbxchoices">
               
                 @{

                             var searchEnums = Constants.SearchTypes;
                             foreach (var singleItem in searchEnums)
                             {
                                 <optgroup label=@singleItem.Key>
                                  
                                 @foreach (var searchItem in singleItem.Value)
                                 {
                                  <option value=@searchItem.ToString()>@Utility.GetEnumDescription((searchItem))</option>
                                 }
                                  </optgroup>
                             }
                  }          
              </select>           
            <br />
            <input id="Button1" 
                  type="button" value="button" />
        </div>
    
        <div id="example" class="k-content">
                <div id="grid"></div>
        </div>
    

    }
}


<br />

<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<input type="button" id="clickMe" value="Click to Add " />
<form id="frmNewEmployee">
  
        <div class="editor-label">
            <label>Employee Id</label>
        </div>
        <div class="editor-field">
            <input type="text" id="txtbxempId" name="employee.emp_no" />
        </div>
        <div class="editor-label">
            <label>First Name</label>
        </div>
        <div class="editor-field">
            <input type="text" name="employee.first_name" />
        </div>
        <div class="editor-label">
            <label>Last Name</label>
        </div>
        <div class="editor-field">
            <input type="text" name="employee.last_name"  />
        </div>
        <div class="editor-label">
            <label>Birth Date</label>
        </div>
        <div class="editor-field">
            <input type="text" name="employee.birth_date" class="datefield" value="" />
        </div>
        <div class="editor-label">
            <label>Gender</label>
        </div>
        <div class="editor-field">
            <select  name="employee.gender">
                <option value="M">M</option>
                <option value="F">F</option>
            </select>
        </div>
        <div class="editor-label">
            <label>Hire Date</label>
        </div>
        <div class="editor-field">
            <input type="text" name="employee.hire_date" class="datefield" value="" />
        </div>
      <div class="editor-label">
            <label>Title</label>
        </div>
        <div class="editor-field">
            <input type="text" name="employee.emp_title.title"  />
        </div>
      <div class="editor-label">
            <label>Department</label>
        </div>
        <div class="editor-field">
            <input type="text" name="employee.emp_title.department"  />
        </div>
     <button type="submit"  id="btnEmployee">Get JSON</button>
</form>

<br />
<br />